#include <iostream>
#include"socket.hpp"
#include <sys/types.h>
#include <cstring>
#include <sys/socket.h>
#include <algorithm>
#include <memory>
#include "InetAddr.hpp"
#include "Log.hpp"


using namespace socket_ns;
int main()
{
    TcpSocket tp;
    std::cout<<"Tcpsocket pass"<<std::endl;
    
    Socket* sk=&tp;
     InetAddr server("0.0.0.0",8889);
    std::cout<<"socket* pass"<<std::endl;

   
    std::cout<<"InetAddr pass"<<std::endl;
    sk->BuildServerSocket(server);
    std::cout<<"Build pass"<<std::endl;
    
    InetAddr peer;
    sk->AcceptSocket(&peer);
    std::cout<<"Accept pass"<<std::endl;

    return 0;
}